using PageFlowQuickstart.Modules.Customers.BusinessEntities;

namespace PageFlowQuickstart.Modules.Customers.Tests.Mocks
{
    internal class MockCustomersController : CustomersController
    {
        public MockCustomersController()
            : base(new MockPageFlowProvider())
        {
        }
        
        public Customer InnerCurrentCustomer = null;
        public bool ApproveCurrentCustomerCalled = false;
        public bool CurrentCustomerRetrieved = false;
        public bool StartCustomersApprovalCalled = false;
        public bool FinishCustomerApprovalCalled = false;

        public override Customer CurrentCustomer
        {
            get 
            {
                CurrentCustomerRetrieved = true; 
                return InnerCurrentCustomer;
            }
        }

        public override void ApproveCurrentCustomer()
        {
            ApproveCurrentCustomerCalled = true;
        }

        public override void StartCustomerApproval()
        {
            StartCustomersApprovalCalled = true;
        }

        public override void FinishCustomerApproval()
        {
            FinishCustomerApprovalCalled = true;
        }
    }
}
